#ifndef G711ENCODER_H
#define G711ENCODER_H
#include <cstdint>

class G711Encoder
{
public:
    // Function to encode a single PCM sample to G.711 μ-law
    static uint8_t encodeMuLaw(int16_t pcm_val);

    // Function to encode a single PCM sample to G.711 A-law
    static uint8_t encodeALaw(int16_t pcm_val);

    // Function to encode a single PCM sample to G.711 A-law
    static uint8_t encodeALaw1(int16_t pcm_val);

    // Function to encode a single PCM sample to G.711 A-law
    static uint8_t encodeALaw2(int16_t pcm_val);

    static int search(
        int val,	/* changed from "short" *drago* */
        int *table,
        int size);	/* changed from "short" *drago* */

    //
    static int linear2alaw(int	pcm_val);

    static int alaw2linear(int a_val);


};

#endif // G711ENCODER_H
